Add initializer which sets the TZ environment variable

This properly propagates the configured TIMEZONE to the system TZ variable which is used by libv8 in the JavascriptAgent
to access the current time.

Dominik Sander 8 jaren geleden
bovenliggende
commit
c48ff63e7a
1 gewijzigde bestanden met toevoegingen van 2 en 0 verwijderingen
  1. 2 0
      config/initializers/timezone.rb

+ 2 - 0
config/initializers/timezone.rb

@@ -0,0 +1,2 @@
1
+# Set the timezone for the JavascriptAgent (libv8 only relies on the TZ variable)
2
+ENV['TZ'] = Time.zone.tzinfo.canonical_identifier